package com.ss.android.article.base.feature.model;

import com.ss.android.common.download.DownloadInfoChangeListener;
import com.ss.android.common.download.DownloadShortInfo;
import java.lang.ref.WeakReference;

public final class g implements DownloadInfoChangeListener {
    public volatile WeakReference a;
    public long b;
    private DownloadInfoChangeListener c;

    public g(DownloadInfoChangeListener arg2) {
        this(arg2, (byte) 0);
    }

    private g(DownloadInfoChangeListener arg3, byte arg4) {
        this.c = arg3;
        this.a = new WeakReference(null);
    }

    public final void setDownloadId(long id) {
        if(this.c != null) {
            this.c.setDownloadId(id);
        }

        if(this.a != null && this.a.get() != null) {
            ((DownloadInfoChangeListener)this.a.get()).setDownloadId(id);
        }

        this.b = id;
    }

    public final void onDownloadProgressChanged(DownloadShortInfo arg12, int arg13, long arg14, long arg16, long arg18) {
        if(this.c != null) {
            this.c.onDownloadProgressChanged(arg12, arg13, arg14, arg16, arg18);
        }

        if(this.a != null && this.a.get() != null) {
            ((DownloadInfoChangeListener)this.a.get()).onDownloadProgressChanged(arg12, arg13, arg14, arg16, arg18);
        }
    }
}

